package com.zmn.oms.zmn.business.interfaces.redistribute;

import com.zmn.oms.common.dio.redistribute.RedistributeServingDuplicateOrderDIO;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.bo.work.redistribute.OrderWorkRedistributeModifyBO;
import com.zmn.oms.model.query.redistribute.OrderWorkRedistributeQuery;
import com.zmn.oms.model.vo.redistribute.OrderWorkRedistributeInfoVO;
import com.zmn.oms.model.vo.redistribute.OrderWorkRedistributeMasterVO;

import java.util.List;

/**
 * 类描述: 工单改派信息 业务逻辑处理类
 *
 * @author: liudi
 * @since: 2022/05/11 14:00
 */
public interface OrderWorkRedistributeInfoBService {

	/**
	 * 根据 改派id 查询改派信息
	 *
	 * @param redistributeId
	 * @return
	 */
	OrderWorkRedistributeInfoVO getRedistributeInfoVOById(Long redistributeId);

	/**
	 * 查询改派列表数据
	 *
	 * @param query
	 * @return
	 */
	List<OrderWorkRedistributeInfoVO> listPageByQuery(OrderWorkRedistributeQuery query);

	/**
	 * 获取可改派的工程师列表
	 *
	 * @param orderId
	 * @param workId
	 * @return 获取可改派的工程师列表
	 */
	List<OrderWorkRedistributeMasterVO> listRedistributeEngineer(Long orderId, Long workId);

	/**
	 * 创建导出任务
	 *
	 * @param query
	 */
	void buildExportTask(OrderWorkRedistributeQuery query) throws OmsBaseException;

	/**
	 * 异步导出工单列表
	 * @param query
	 */
	void asyncExportListRedistributeByQuery(OrderWorkRedistributeQuery query);

	/**
	 * 检查是否有在途重复的订单
	 *
	 * @param dio
	 * @return
	 */
	Boolean checkServingDuplicateOrder(RedistributeServingDuplicateOrderDIO dio);

	/**
	 * 添加备注
	 *
	 * @param modityBO
	 * @return
	 */
	void addRemark(OrderWorkRedistributeModifyBO modityBO) throws OmsBaseException;
}